import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

/* 布局*/
// import Layout from "@/views/layout/Layout";

/* 路由模块*/
export const constantRouterMap = [{
        path: "/login",
        component: () =>
            import ("@/views/login/index"),
        hidden: true
    },
    {
        path: "/auth-redirect",
        component: () =>
            import ("@/views/login/authredirect"),
        hidden: true
    },
    {
        path: "/404",
        component: () =>
            import ("@/views/errorPage/404"),
        hidden: true
    },
    {
        path: "/401",
        component: () =>
            import ("@/views/errorPage/401"),
        hidden: true
    },
    {
        path: "",
        component: () =>
            import ("@/views/errorPage/401"),
        hidden: true
    }
];

export default new Router({
    mode: "hash",
    scrollBehavior: () => ({ y: 0 }),
    routes: constantRouterMap
});